CREATE TABLE [dbo].[TTMEDI_PAGO]
(
[CO_MEPA] [dbo].[TD_VC_003] NOT NULL,
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[DE_MEPA] [dbo].[TD_VC_100] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTMEDI_PA__CO_US__64CCF2AE] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTMEDI_PA__FE_US__65C116E7] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTMEDI_PA__CO_US__66B53B20] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTMEDI_PA__FE_US__67A95F59] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTMEDI_PAGO] ADD CONSTRAINT [PK__TTMEDI_P__58E75553673F4B05] PRIMARY KEY CLUSTERED  ([CO_MEPA], [CO_EMPR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTMEDI_PAGO] ADD CONSTRAINT [FK__TTMEDI_PA__CO_EM__5303482E] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMEMPR] ([CO_EMPR])
GO
GRANT SELECT ON  [dbo].[TTMEDI_PAGO] TO [public]
GRANT INSERT ON  [dbo].[TTMEDI_PAGO] TO [public]
GRANT DELETE ON  [dbo].[TTMEDI_PAGO] TO [public]
GRANT UPDATE ON  [dbo].[TTMEDI_PAGO] TO [public]
GO
